﻿<div ng-controller="distributionController">
	<div class="wrapper border-bottom white-bg page-heading">
		<div class="col-lg-pull-12">
			<ol class="breadcrumb">
				<li>商户</li>
			</ol>
		</div>
	</div>
	<form class="form-horizontal row">
		<div class="form-group">
			<div class="col-sm-4">
				<label class="col-sm-4 control-label">商户号</label>
				<div class="col-sm-8">
					<input name="merchant_no" type="text" class="form-control input-sm" ng-model="query.merchant_no">
				</div>
			</div>
			<div class="col-sm-4">
				<label class="col-sm-4 control-label">手机号</label>
				<div class="col-sm-8">
					<input name="mobile" type="text" class="form-control input-sm" ng-model="query.mobile">
				</div>
			</div>
			<div class="col-sm-4">
				<label class="col-sm-4 control-label">姓名</label>
				<div class="col-sm-8">
					<input name="nick" type="text" class="form-control input-sm" ng-model="query.nick">
				</div>
			</div>
		</div>
		
		<div class="form-group">
			<div class="col-sm-4">
				<label class="col-sm-4 control-label">注册时间</label>
				<div class="col-sm-8">
					<div date class="input-group date">
						<input class="form-control input-sm" ng-model="query.start_time">
						<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
					</div>
				</div>
			</div>
			<div class="col-sm-4">
				<div class="col-sm-8">
					<div date class="input-group date">
						<input class="form-control input-sm" ng-model="query.end_time">
						<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
					</div>
				</div>
			</div>
		
		</div>
		
		<div class="form-group">
			<div class="col-sm-4">

				<div class="col-sm-offset-4 col-sm-8">
				
					<a class="btn btn-primary btn-sm" ui-sref="app.merchant.list(query)"><i class="fa fa-search"></i> 查询</a>
					<!--<button class="btn btn-primary btn-sm"><i class="fa fa-download"></i> 导出</button>-->
				</div>
			</div>
		</div>
	</form>
	<table class="table table-hover m-t-md">
		<thead>
			<tr style="background-color: #f7f7f9;">
				<th>手机号/归属</th>
				<th>名称/微信号</th>
				
				<th>商户号</th>
				<th>注册时间</th>
				
				<th >操作</th>
			</tr>
		</thead>
		<tbody>
			<tr ng-repeat="item in list.rows">
				<td>{{item.mobile}}<br>{{get_oem_name(item.parent_id)}}</td>
				<td>{{item.name}}<br>{{item.setting.hf_set.wx_account}}</td>
				<!--<td>{{item.disabled?"禁用":"启用"}}/{{auth_status_name(item.auth_status)}}</td>-->
				<td>{{item.merchant_no}}</td>
				<td>{{item.create_time}}</td>
				
                <td>
                    <a class="btn btn-primary btn-xs"ui-sref="app.distribution.detail({id:{{item.id}}})" ><i class="fa fa-cog"></i> 设置</a>
                    <!--<a class="btn btn-primary btn-xs" ui-sref="app.merchant.auth({id:item.id})"><i class="fa fa-address-card"></i> {{auth_status_name(item.auth_status)}}</a>
    <a class="btn btn-primary btn-xs" href="javascript:void(0);" ng-click="remove(item.id)"><i class="fa fa-trash"></i> 删除</a>-->
                </td>
			</tr>
		</tbody>
	</table>
	<div class="row">
		<div class="col-md-12">
			<uib-pagination total-items="model.total_result" items-per-page="model.size" ng-model="model.page" num-pages="model.total_pages"
							ng-change="searchmerchant_page(model.page)" class="pagination-sm" boundary-links="true" boundary-link-numbers="true" max-size="20"
							previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"></uib-pagination>
			<span class="pull-right" style="margin: 30px 0px 20px 0px">共{{model.total_result}} 当前：{{model.page}}/{{model.total_pages}}</span>
		</div>
	</div>
</div>
